//PlatformFundLogModel
//2020-08-25 10:59:19

package models

import (
	"git.900sui.cn/kc/base/common/functions"
	"git.900sui.cn/kc/base/common/models/base"
	"git.900sui.cn/kc/kcgin/orm"
)

//表结构体
type PlatformFundLogModel struct {
	Model *base.Model
	Field PlatformFundLogModelField
}

//表字段
type PlatformFundLogModelField struct {
	T_table            string `default:"platform_fund_log"`
	F_id               string `default:"id"`
	F_pay_channel      string `default:"pay_channel"`
	F_fund_source_id   string `default:"fund_source_id"`
	F_fund_source_type string `default:"fund_source_type"`
	F_amount           string `default:"amount"`
	F_type             string `default:"type"`
	F_order_sn         string `default:"order_sn"`
	F_order_type       string `default:"order_type"`
	F_fund_type        string `default:"fund_type"`
	F_create_time      string `default:"create_time"`
}

//初始化
func (p *PlatformFundLogModel) Init(ormer ...orm.Ormer) *PlatformFundLogModel {
	functions.ReflectModel(&p.Field)
	p.Model = base.NewModel(p.Field.T_table, ormer...)
	return p
}

//新增数据
func (p *PlatformFundLogModel) Insert(data map[string]interface{}) int {
	result, _ := p.Model.Data(data).Insert()
	return result
}
